package com.fjwt.gz.service.mapper;

import com.fjwt.gz.db.bo.ActivityAwardAndSettingBo;
import com.fjwt.gz.db.entity.ActivityAwardEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fjwt.gz.db.vo.ActivityAwardVO;
import com.fjwt.gz.db.vo.CouponVO;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;

/**
 * <p>
 * 营销活动奖品对应表 Mapper 接口
 * </p>
 *
 * @author shiyonghao
 * @since 2025-04-09
 */
public interface ActivityAwardMapper extends BaseMapper<ActivityAwardEntity> {

  List<ActivityAwardAndSettingBo> getAwardAndSetting(@Param("activityId") Long activityId);


  /**
   * 根据活动id查询活动奖品对应的卡券数量  --越减越便宜活动
   * @param activityId 活动ID
   * @return
   */
  ActivityAwardVO getActivityCouponNum(@Param("activityId") Long activityId);

  /**
   * 查询 活动卡券的剩余数量【公共可用，目前先加卡券的类型】
   * @return
   */
  ActivityAwardVO getActivityAwardNum(@Param("activityId") Long activityId,@Param("awardId") Long awardId);

    List<ActivityAwardVO> queryList(@Param("activityId") Long activityId);
  /**
   * 查询奖品配置活动信息及app信息
   * @param awardId
   * @param awardType
   * @return
   */
  ActivityAwardAndSettingBo selectActivityAndApp(Long awardId, Integer awardType);

  /**
   * 获取活动已绑定的卡券信息
   * @param activityIds
   * @return
   */
  List<CouponVO> getCouponByActivityIds(@Param("activityIds") Collection<Long> activityIds);
}
